<script setup lang="ts">
import { ref } from 'vue';
</script>

<template>
  <page class="page" custom-overflow="visible">
    <page-template pageBgColor="#212121" footerBtnTitle="点击查看更多" :footerBtnIcon="true">
      <view class="head"></view>
      <view class="series">
        <view class="series-head">
          <view class="series-head-left">
            <image class="series-head-left-img" src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="series-head-title">一加品牌旗舰</view>
            <image class="series-head-left-icon" src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/one-plus.png" mode="aspectFill"></image>
          </view>
          <view class="series-head-right"><view>查看更多</view> <u-icon style="margin-top: 2rpx;" color="#999999" name="arrow-right" size="14"></u-icon></view>
        </view>
        <view class="series-body">
          <view class="series-body-item" v-for="item in 4" :key="item">
            <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="item-mark"><mark-tips style="margin-right: 10rpx;"></mark-tips><discount-button></discount-button></view>
            <view class="item-title">苹果15ProMax</view>
            <view class="item-bottom"> 
              <hire-button>
                <view class="price-left">
                  <price-box num="15.24" color="#FFF0C7"></price-box>
                </view>
              </hire-button>
            </view>
          </view>
        </view>
      </view>
      <view class="series">
        <view class="series-head">
          <view class="series-head-left">
            <image class="series-head-left-img" src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="series-head-title">三星品牌旗舰</view>
            <image class="series-head-left-icon" src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/san-sung.png" mode="aspectFill"></image>
          </view>
          <view class="series-head-right"><view>查看更多</view> <u-icon style="margin-top: 2rpx;" color="#999999" name="arrow-right" size="14"></u-icon></view>
        </view>
        <view class="series-body">
          <view class="series-body-s" v-for="item in 4" :key="item">
            <view class="item-title">苹果15ProMax</view>
            <view class="series-body-s-bottom"> 
              <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
              <view class="content-right">
                <view class="item-mark"><mark-tips style="margin-right: 10rpx;"></mark-tips><discount-button></discount-button></view>
                <hire-button>
                  <view class="price-left">
                    <price-box num="15.24" color="#FFF0C7"></price-box>
                  </view>
                </hire-button>
              </view>
            </view>
          </view>
        </view>
      </view>
      <view class="series">
        <view class="series-head">
          <view class="series-head-left">
            <image class="series-head-left-img" src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="series-head-title">真我品牌旗舰</view>
            <image class="series-head-left-icon" src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/one-plus.png" mode="aspectFill"></image>
          </view>
          <view class="series-head-right"><view>查看更多</view> <u-icon style="margin-top: 2rpx;" color="#999999" name="arrow-right" size="14"></u-icon></view>
        </view>
        <view class="series-body">
          <view class="series-body-t" v-for="item in 6" :key="item">
            <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="item-mark"><mark-tips style="margin-right: 10rpx;"></mark-tips><discount-button></discount-button></view>
            <view class="item-title">苹果15ProMax</view>
            <view class="item-bottom"> 
              <hire-button>
                <view class="price-left">
                  <price-box num="15.24" color="#FFF0C7"></price-box>
                </view>
              </hire-button>
            </view>
          </view>
        </view>
      </view>
    </page-template>
  </page>
</template>
<style lang="scss" scoped>
.head {
  margin-left: -20rpx;
  margin-right: -20rpx;
  height: 245rpx;
  background: url('https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/more-head.png') no-repeat center center/100% 100%;
}
.series {
  margin-top: 60rpx;
  &:last-child{
    margin-bottom: 20rpx;
  }
  &-head {
    height:76rpx;
    padding: 0 16rpx;
    background:#ffffff;
    border-radius: 20rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    &-left {
      display: flex;
      align-items: center;
      &-img {
        margin-top: -40rpx;
        width: 120rpx;
        height: 120rpx;
      }
      &-icon {
        width: 157rpx;
        height: 48rpx;
      }
    }
    &-title {
      margin-left: 20rpx;
      margin-right: 12rpx;
      font-family: Alimama ShuHeiTi;
      font-weight: bold;
      font-size: 34rpx;
      color: #333333;
      line-height: 48rpx;
    }
    &-right {
      display: flex;
      align-items: center;
      font-family: PingFang SC;
      font-weight: 400;
      font-size: 24rpx;
      color: #999999;
      line-height: 33rpx;
    }
  }
  &-body{
    margin-top: 20rpx;
    padding: 16rpx 8rpx;
    display: flex;
    flex-wrap: wrap;
    background: #EFEFEF;
    border-radius: 20rpx;
    .item-bottom{
        width: 220rpx;
      }
      
    .item-title{
      margin-bottom: 10rpx;
      font-family: Alibaba PuHuiTi;
      font-weight: bold;
      font-size: 29rpx;
      color: #000000;
      line-height: 41rpx;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .item-mark{
      margin-top: 6rpx;
      margin-bottom: 10rpx;
      display: flex;
    }
    &-item{
      margin-top:10rpx;
      margin-right:10rpx;
      width: calc(50% - 5rpx);
      padding: 20rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      background: #ffffff;
      border-radius: 20rpx;
      &:nth-child(2n){
        margin-right: 0;
      }
      &:nth-child(1), &:nth-child(2){
        margin-top: 0;
      }
      image{
        margin-bottom: 6rpx;
        width: 148rpx;
        height:148rpx;
      }
     
    }
    &-s{
      padding: 16rpx 8rpx; 
      margin-top:10rpx;
      margin-right:10rpx;
      width: calc(50% - 5rpx);
      background: #ffffff;
      border-radius: 20rpx;
      image{
        width:100rpx;
        height:120rpx;
      }
      &:nth-child(2n){
        margin-right: 0;
      }
      &:nth-child(1), &:nth-child(2){
        margin-top: 0;
      }
      &-bottom{
        display: flex;
        align-items: center;
        .content-right{
          margin-left: 6rpx;
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: center;
        }
      }
    }
    &-t{
      padding: 16rpx 8rpx;
      margin-top:10rpx;
      margin-right:10rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: calc((100% - 20rpx) / 3);
      background: #ffffff;
      border-radius: 20rpx;
      image{
        width: 130rpx;
        height: 148rpx;
      } 
      &:nth-child(3n){
        margin-right: 0;
      }
    }
  }
}
.price-left{
  margin-right: 11rpx;
  padding-right: 10rpx;
  position: relative;
  &::after{
    content: '';
    position: absolute;
    right: 0;
    top: 12rpx;
    bottom: 12rpx;
    width: 1rpx;
    background: #ffffff;
  }
}

</style>

